Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

305
Visualizações
What is the data format specification for "Chromium Web Custom MIME Data Format"?

I have a WPF application that supports receiving drag and drop data from Chrome. When the data is received by IDataObject the data format is "Chromium Web Custom MIME Data Format". This is because I use custom MIME type for dataTransfer.setData from JavaScript. This is expected behavior.

My question is, what is the actual specification for this data?

The data is a MemoryStream of bytes that I can convert to a Unicode string. Given a MIME type of application/x-myapp.document+text and a value of {F5F5A3C3-3594-430B-988F-BA1C0154201E} the string will look like the following:

" \0\u0001\0#\0application/x-myapp.document+text\0&\0{F5F5A3C3-3594-430B-988F-BA1C0154201E}"

If I split the string by the null terminators it is six parts:

  1. (_determined this to be the size of the data (length) and is not any real character of a string)
  2. \u0001 (determined this to be the number of data items)
  3. #
  4. application/x-myapp.document+text (the custom MIME type)
  5. &
  6. {F5F5A3C3-3594-430B-988F-BA1C0154201E} (the custom value)

I have observed that #2 is just a number and seems to represent the number of key value pairs in the data (mime/value). Then I have my MIME type, and actual value. It appears that this data is the HTML 5 Drag Data Store, or possibly the drag store item list.

So again, my final questions:

  • What is the actual format of this data? Is it data defined by the HTML 5 specification, or is it actually the Windows Clipboard format?
  • Where can I find a data specification so I can write code to parse this correctly?
  • Or does someone have a better answer to all of this?

I also will need to do this with Firefox and the data appears to be similar, but possibly with a different Encoding. So if this is known information also, it would be helpful.

I have also tried using a BinaryReader but without a specification I have been unable to read the data in a manner that produces correct results, and I have been using the HTML 5 spec (https://html.spec.whatwg.org/multipage/dnd.html#the-drag-data-store).

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda